<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App',
  data() {
    return {}
  },
  computed: {},
  watch: {},
  created() {
    this.getToken();
  },
  methods: {
    getToken(){
      let url = window.location.href;
      const regex = /[?&]([^=#]+)=([^&#]*)/g;
      const params = {};
      let match;
      while ((match = regex.exec(url))) {
        params[decodeURIComponent(match[1])] = decodeURIComponent(match[2]);
      }
      localStorage.setItem('access_token', params.token);
    },
  }
}
</script>
<style lang="scss">
  #app {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
</style>
